package com.atzexu.service.impl;

import com.atzexu.domain.KsClass;
import com.atzexu.mapper.ClassMapper;
import com.atzexu.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * ks_class表业务层实现类
 */
@Service
public class ClassServiceImpl implements ClassService {

    @Autowired
    private ClassMapper classMapper;

    /**
     * 查询班级列表数据
     * @return
     */
    @Override
    public List<KsClass> getClassList() {
        return classMapper.getClassList();
    }

    /**
     * 查询学生所在班级
     * @return
     */
    @Override
    public List<KsClass> getStudetClass(Integer classId) {
        List<KsClass> list = new ArrayList<>();
        KsClass studetClass = classMapper.getStudetClass(classId);
        list.add(studetClass);
        return list;
    }
}
